import Vue from 'vue'
import VueRouter from 'vue-router'
import EchartView from '../views/EchartView.vue'
import ElementUI from 'element-ui'
// 导入 elementUI 对应的 CSS
import 'element-ui/lib/theme-chalk/index.css'
import indext from '../views/table/indext.vue'
import index from '../views/bank/index.vue'
import bankUi from '../views/bank/bankUi.vue'

import scroll from '../views/scroll/scroll.vue'
import scrollFile from '../views/scroll/scrollFile.vue'
Vue.use(ElementUI)

Vue.use(VueRouter)

const routes = [
  {
    path: '/indext',
    name: 'indext',
    component: indext
  },
  {
    path: '/s',
    name: 'scrollFile',
    component: scrollFile
  },
  {
    path: '/s2',
    name: 'scroll',
    component: scroll
  },
  {
    path: '/',
    name: 'index',
    component: index,
    children: [
      {
        path: "/bank/bankUi",
        component: bankUi
      },{
        path: "/table/indext",
        component: indext
      },{
        path: "/scroll/scroll",
        component: scroll
      }
      ,{
        path: "/scroll/scrollFile",
        component: scrollFile
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
